package asia.lxq.cic.util;

import asia.lxq.cic.config.GlobalConfig;

public class UserDirUtil {
    public static String getUserDirGroupRoot(){
        return GlobalConfig.CIC_ROOT+"user_storage/";
    }
    public static String getUserDir(int userId){
        return getUserDirGroupRoot()+GlobalConfig.USER_DIR_PRE+userId+"/";
    }
    public static String getUserResDir(int userId){
        return getUserDir(userId) + "resource/";
    }
    public static String getUserResDir(int userId,String resName){
        return getUserDir(userId) + "resource/"+resName;
    }
    public static String getUserVirtualResDir(int userId){
        return GlobalConfig.RESOURCE_ROOT+"user_storage/"+GlobalConfig.USER_DIR_PRE+userId+"/resource/";
    }
    public static String getUserVirtualResDir(int userId,String resName){
        return GlobalConfig.RESOURCE_ROOT+"user_storage/"+GlobalConfig.USER_DIR_PRE+userId+"/resource/"+resName;
    }
    public static String getUserPic(int userId){
        return GlobalConfig.RESOURCE_ROOT + "user_storage/" + GlobalConfig.USER_DIR_PRE + userId + "/pic_" + userId + ".png";
    }
    public static String getRealUserPic(int userId){
        return getUserDir(userId) + "pic_" + userId + ".png";
    }
}
